-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add plugin ckb fiber #2084
Open
FiberInEliza
wants to merge
24
commits into
elizaOS:main
Choose a base branch
from
FiberInEliza:plugin-ckb-fiber
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+4,907
−75
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @FiberInEliza! Welcome to the ai16z community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now a ai16z contributor!
odilitime
reviewed
Jan 10, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CKB Fiber Plugin
Fiber is a type of Lightning Network that enables AI Agents to make stablecoin payments using the Lightning Network. This PR introduces a new plugin: the CKB Fiber Plugin, enabling the Eliza agent to interact with the Fiber Network by managing a Fiber node. We implemented a standalone Fiber Network RPC client and developed a series of actions within the Eliza framework. These actions leverage the RPC client to send RPC requests and facilitate communication with the Fiber node.
Configuration
The plugin requires the following environment variables:
You can check the default values in
src/constants.ts
Available Actions
GET_INFO: Retrieves the current node information from the agent-controlled Fiber node.
LIST_CHANNELS: Lists all the opened channels of the agent-controlled Fiber node.
SEND_PAYMENT: Given an invoice, payment amount, and asset type (CKB, USDI, or RUSD) in the context, the agent-controlled Fiber node will verify and send the payment.
GET_PAYMENT: Given a specific payment hash, retrieves the payment details.
NEW_INVOICE: Given an amount and asset type (CKB, USDI, or RUSD), the agent generates a new invoice, enabling others to send funds to the agent-controlled Fiber node.
Cautions & Notes
Start Your Fiber Node: Before using the CKB Fiber Plugin, ensure that your Fiber node is up and running. The Fiber node should be connected to the Fiber network and have sufficient channels opened to facilitate payment transactions. Check nervosnetwork/fiber for more information.
Network Access Control: If the Fiber node’s RPC URL is exposed to the external network without proper access control, there could be potential unauthorized access. Ensure the RPC URL is secured or only accessible within the local network to avoid unintended exposure.
Sensitive Actions: Some actions, such as transfers, involve handling sensitive operations. These actions should be properly secured to prevent users from directly triggering them in inappropriate scenarios (e.g., unauthorized transfers). Ensuring proper access control and validation for these actions is critical.
Channel and Network Connectivity: If the Fiber node is not connected to the network or doesn't have enough channels opened, SEND_PAYMENT action will fail. This could affect the overall functionality and cause disruptions in the intended operations of the Fiber node and Eliza Agent interactions.
Benefits
Seamless CKB Integration
Robust Financial Operations
Flexible Payment Options
Enhanced Security
Implementation Status
Core CKB Functionality
Fiber Framework Integration
Payment Processing Features
USD Denomination Support
Upcoming Features
Testing
Usage
Integration